home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / cisco / tacacsd.shar / xtacacsd / tacacs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-07  |  3.1 KB  |  137 lines

  1. /*
  2.  * tacacs.h - TAC access protocol support
  3.  *
  4.  */
  5.  
  6. #define    TA_VERSION        0
  7. #define XTA_VERSION        0x80
  8.  
  9. /*
  10.  * global flags in tacacs_extended
  11.  */
  12. #define TACACS_EXTEND        0x01    /* extended tacacs is enabled */
  13. #define TACACS_ASKCONNECT    0x02    /* ask about connection */
  14. #define TACACS_NOTECONNECT    0x04    /* notifiy about connections */
  15. #define TACACS_ASKSLIP        0x08    /* ask about SLIP command */
  16. #define TACACS_NOTESLIP        0x10    /* notify about SLIP command */
  17. #define TACACS_ASKENA        0x20    /* ask about "enable" */
  18. #define TACACS_NOTEENA        0x40    /* notify about enable */
  19. #define TACACS_NOTELOGOUT    0x80    /* notify about logout/disconnect */
  20.  
  21. /*
  22.  * Operations
  23.  */
  24.  
  25. #define    TA_QUERY        1
  26. #define    TA_ANSWER        2
  27. #define    TA_CHANGE        3
  28. #define    TA_FOLLOW        4
  29.  
  30. /*
  31.  * ANSWER responses
  32.  */
  33.  
  34. #define    TA_A_ACCEPTED    1
  35. #define    TA_A_REJECTED    2
  36.  
  37. /*
  38.  * Reasons included in ANSWER
  39.  */
  40.  
  41. #define TA_A_NONE    0
  42. #define    TA_A_EXPIRING    1
  43. #define    TA_A_PASSWORD    2
  44. #define    TA_A_DENIED    3
  45.  
  46. /*
  47.  * TACACS packet structure and sizes
  48.  */
  49.  
  50. typedef struct tacacstype_ {
  51.     uchar version;
  52.     uchar type;
  53.     ushort trans;
  54.     uchar namelen;
  55.     uchar pwlen;
  56. } tacacstype;
  57.  
  58. #define    TACACS_SIZE    6
  59.  
  60. /*
  61.  * eXtended TACACS
  62.  * Try to keep longwords longword aligned.
  63.  */
  64. typedef struct xtacacstype_ {
  65.     uchar version;        /* version of protocol */
  66.     uchar type;            /* Type of query/response */
  67.     ushort trans;        /* transaction ID */
  68.     /*---------------*/
  69.     uchar namelen;        /* length of name */
  70.     uchar pwlen;        /* length of password */
  71.     uchar response;        /* response code */
  72.     uchar reason;        /* reason for response */
  73.     /*---------------*/
  74.     ulong uuid;            /* user id code assigned. */
  75.     /*---------------*/
  76.     ulong dhost;        /* destination host */
  77.     /*---------------*/
  78.     ushort dport;        /* destination port */
  79.     ushort lport;        /* local line number */
  80.     /*---------------*/
  81.     ulong flags;        /* misc flags */
  82.     /*---------------*/
  83.     ushort accesslist;        /* access list for user */
  84.                 /* user name */
  85.                 /* password */
  86. } xtacacstype;
  87.  
  88. #define XTACACSSIZE 26
  89. /*
  90.  * "types"
  91.  */
  92.  
  93. #define    XTA_LOGIN    1
  94. #define    XTA_ANSWER    2
  95. #define    XTA_CHANGE    3
  96. #define    XTA_FOLLOW    4
  97. #define XTA_CONNECT    5
  98. #define XTA_ENABLE    6
  99. #define XTA_LOGOUT    7
  100. #define XTA_RELOAD    8
  101. #define XTA_SLIPON    9
  102. #define XTA_SLIPOFF    10
  103. #define XTA_SLIPADDR   11
  104.  
  105. /*
  106.  * ANSWER responses
  107.  */
  108.  
  109. #define    XTA_A_ACCEPTED    1
  110. #define    XTA_A_REJECTED    2
  111.  
  112. /*
  113.  * reasons for rejection of request
  114.  */
  115.  
  116. #define XTA_A_NONE    0
  117. #define    XTA_A_EXPIRING    1
  118. #define    XTA_A_PASSWORD    2
  119. #define    XTA_A_DENIED    3
  120. /*
  121.  * The following are reasons for "logout" and "slipoff" xtacacs messages
  122.  */
  123. #define XTA_R_QUIT    4    /* user quit normally */
  124. #define XTA_R_IDLE    5    /* idle timeout */
  125. #define XTA_R_DROP    6    /* carrier dropped */
  126. #define XTA_R_BAD    7    /* too many bad passwords */
  127.  
  128. /*
  129.  * flags used
  130.  */
  131. #define XTA_F_NOENABLE       1    /* user may not enable */
  132. #define XTA_F_NOENAPASS       2    /* user may enable without password */
  133. #define XTA_F_NOSLIP       4    /* user may not run SLIP */
  134. #define XTA_F_SLIPPASS       8    /* user needs ok to run SLIP */
  135. #define XTA_F_CONNPASS    0x10    /* user needs ok to make connections */
  136. #define XTA_F_ACCESS    0x20    /* use the provided access list number */
  137.